package com.ecodemo.everything;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import java.io.File;
import java.util.ArrayList;

public class PkgCheck extends ArrayAdapter<File> {
    Context context;
    hold h = ((hold) null);
    private int resourceId;

    public final class hold {
        public TextView name;
        public TextView path;
        private final PkgCheck pc;

        public hold(PkgCheck com_Delsart_search_pkgcheck) {
            this.pc = com_Delsart_search_pkgcheck;
        }
    }

    public PkgCheck(Context context, int i, ArrayList<File> arrayList) {
        super(context, i, arrayList);
        this.resourceId = i;
        this.context = context;
    }

    @Override
    public View getView(int i, View view, ViewGroup viewGroup) {
        File file = getItem(i);
        if (view == null) {
            this.h = new hold(this);
            view = LayoutInflater.from(this.context).inflate(this.resourceId, (ViewGroup) null);
            this.h.path = view.findViewById(R.id.path);
            this.h.name =  view.findViewById(R.id.name);
            view.setTag(this.h);
        } else {
            this.h = (hold) view.getTag();
        }
        try {
            this.h.path.setText(file.getParent());
            this.h.name.setText(file.getName());
        } catch (NullPointerException e) {
        }
        return view;
    }
}

